﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<Sisocana.Core.Models.NoticiaModel>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    News Feeder
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<script src="<%: Url.Content("~/Scripts/jquery.validate.min.js") %>" type="text/javascript"></script>
<script src="<%: Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js") %>" type="text/javascript"></script>
<script src="<%: Url.Content("~/Scripts/jquery-1.5.1.js") %>" type="text/javascript"></script>
<script src="<%: Url.Content("~/Scripts/jquery-ui-1.8.11.js") %>" type="text/javascript"></script>
<link href="<%: Url.Content("~/Content/themes/base/jquery.ui.all.css") %>" rel="stylesheet" type="text/css" />
<script language="javascript" type="text/javascript">
    $(document).ready(function () {

        $("button, input:submit , input:file , p a").button();
    });
</script>
<h2>News Feeder</h2>
<script src="<%: Url.Content("~/Scripts/jquery.validate.min.js") %>" type="text/javascript"></script>
<script src="<%: Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js") %>" type="text/javascript"></script>
<script src="<%: Url.Content("~/Scripts/jquery-1.5.1.js") %>" type="text/javascript"></script>
<script src="<%: Url.Content("~/Scripts/jquery-ui-1.8.11.js") %>" type="text/javascript"></script>
<link href="<%: Url.Content("~/Content/themes/base/jquery.ui.all.css") %>" rel="stylesheet" type="text/css" />
<script language="javascript" type="text/javascript">
    $(document).ready(function () {

        $("button, input:submit , input:file , p a").button();
    });
</script>
<p>
    <%: Html.ActionLink("Create New", "Create") %>
</p>
<table>
    <tr>
        <th></th>
        <%-- No entra en la pantalla tanta cosa<th>
            Feed Url
        </th>--%>
        <th>
            Name
        </th>
        <th>
            Description
        </th>
        <th>
            Web
        </th>
        <th>
            Logo
        </th>

    </tr>

<% foreach (var item in Model) { %>
    <tr>
        <td>
           <%-- <%: Html.ActionLink("Delete", "Delete", new {  id = item.nombre.Trim()}) %>--%>

             <%= Html.MakeImgLink(Url.Action("Edit", "Noticias", new { id = item.nombre.Trim() }), "Edit", "edit.png")%> | <%= Html.MakeImgLink(Url.Action("Delete", "Noticias", new { id = item.nombre.Trim() }), "Delete", "delete.png")%>

        </td>
       <%-- <td>
            <%: Html.DisplayFor(modelItem => item.feedurl) %>
        </td>--%>
        <td>
            <%: Html.DisplayFor(modelItem => item.nombre) %>
        </td>
        <td>
            <%= Html.Truncate(item.descripcion,100) %>
        </td>
        <td>
            <%= Html.MakeImgLinkCustom(item.pagWeb, "View Web", "url.png","target=_\"Blank\"")%>
        </td>
        <td>
        <% if (item.logoURL != null)
           { %>
            <img alt="logo" height="20px" width"20px" src='<%= item.logoURL %>' />
        <%}
           else
           { %>
                <img alt="logo" height="30px" width"30px" src='<%= Url.Content("~/Content/images/no_image-38x38.jpg")  %>' />
           <%
           } %>
        </td>
    </tr>
<% } %>

</table>

</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="HeaderContent" runat="server">
</asp:Content>
